<?php

namespace App;
use Illuminate\Foundation\Application as BaseApplication;


class Application extends BaseApplication
{

    /**
     * Get the path to the application "app" directory.
     *
     * @return string
     */
    public function path($path='')
    {
       return $this->basePath.DIRECTORY_SEPARATOR.'app'.($path ? DIRECTORY_SEPARATOR.$path : $path);
    }

    public function basePath($path = '')
    {
         return $this->basePath.($path ? DIRECTORY_SEPARATOR.$path : $path);
    }
	
    /**
     * Get the path to the bootstrap directory.
     *
     * @return string
     */
    public function bootstrapPath($path='')
    {       
		return $this->basePath.DIRECTORY_SEPARATOR.'bootstrap'.($path ? DIRECTORY_SEPARATOR.$path : $path);
    }

    /**
     * Get the path to the application configuration files.
     *
     * @return string
     */
    public function configPath($path='')
    {
		return $this->basePath.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'config'.($path ? DIRECTORY_SEPARATOR.$path : $path);
    }

    /**
     * Get the path to the database directory.
     *
     * @return string
     */
    public function databasePath($path='')
    {
		return ($this->databasePath?: $this->basePath.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'database').($path ? DIRECTORY_SEPARATOR.$path : $path);
    }



    /**
     * Get the path to the language files.
     *
     * @return string
     */
    public function langPath()
    {      
		return $this->resourcePath().DIRECTORY_SEPARATOR.'lang';
    }

    /**
     * Get the path to the public / web directory.
     *
     * @return string
     */
    public function publicPath()
    {
        return $this->basePath.DIRECTORY_SEPARATOR.'public';
    }

    /**
     * Get the path to the storage directory.
     *
     * @return string
     */
    public function storagePath()
    {
       return $this->storagePath ?: $this->basePath.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'storage';
    }


    public function resourcePath($path = '')
    {
        return $this->basePath.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'resources'.($path ? DIRECTORY_SEPARATOR.$path : $path);
    }
}
?>